<template>
  <div class="">
    <mavon-editor
      :value="data"
      :subfield="false"
      :defaultOpen="'preview'"
      :toolbarsFlag="false"
    />
  </div>
</template>

<script>
import api from "../../axios/api";
export default {
  data: () => {
    return {
      data: "",
    };
  },
  mounted: function () {
    this.getByWorkId();
  },
  computed: {},
  methods: {
    getByWorkId() {
      api
        .getByWorkId({ workId: this.$route.params.id })
        .then((res) => {
          this.data = res.data.data.text;
        })
        .catch((e) => {
          console.error(e);
        });
    },
  },
};
</script>

<style scoped>
.v-note-wrapper {
  z-index: 0;
}
</style>